package com.example.administrator.projectmoudle_two;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.Button;

public class MainActivity extends Activity implements View.OnClickListener {

    /**
     * 动态墙纸
     */
    private Button mWallpaperBtn;
    /**
     * 显示fragment
     */
    private Button mFragmentBtn;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.activity_main);
        initView();
    }

    private void initView() {
        mWallpaperBtn = (Button) findViewById(R.id.wallpaper_btn);
        mFragmentBtn = (Button) findViewById(R.id.fragment_btn);
        mWallpaperBtn.setOnClickListener(this);
        mFragmentBtn.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.wallpaper_btn:
                startActivity(new Intent(this,CameraWallPapaerActivity.class));
                break;
            case R.id.fragment_btn:
                startActivity(new Intent(this,ShowFragmentActivity.class));
                break;
        }
    }
}
